package com.tanjie.blackbean.pojo.auth;

import com.tanjie.blackbean.pojo.system.ClientType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.Data;

import javax.validation.Valid;
import java.io.Serializable;

/**
 * @author: tanjie
 * @date: 2021-11-08
 **/
@Data
@Builder
@Schema(description = "登录接口请求参数")
public class AuthParam implements Serializable {

    private static final long serialVersionUID = -5660723895257108364L;

    @Schema(description = "认证授权类型", allowableValues = {"PASSWORD", "REFRESH_TOKEN", "SMS"})
    private GrantType grantType;

    @Schema(description = "客户端类型", allowableValues = {"SYS", "OPT-PC", "OPT-H5"})
    private ClientType clientType;

    @Valid
    @Schema(description = "登录用户名密码")
    UsernamePassword usernamePassword;

    @Schema(description = "刷新令牌")
    private String refreshToken;

    @Schema(description = "手机号")
    private String phoneNumber;

}
